require("../../../common/manifest.js"), require("../../../common/vendor.js"), global.webpackJsonpMpvue([ 1 ], {
    "5yg0": function(t, s) {},
    UAfB: function(t, s, a) {
        var i = a("d62r"), n = a("qDs0"), e = a("ybqe")(i.a, n.a, function(t) {
            a("5yg0");
        }, null, null);
        s.a = e.exports;
    },
    d62r: function(t, s, a) {
        (function(t) {
            s.a = {
                data: function() {
                    return {
                        isConnected: !0,
                        isEnter: !1,
                        sortArr: [],
                        sortNum: 0,
                        subSortArr: [],
                        page: 0,
                        isMax: !1,
                        cateId: "",
                        scrollTop: "",
                        isFit: !1
                    };
                },
                onLoad: function() {
                    var t = null;
                    wx.createInterstitialAd && ((t = wx.createInterstitialAd({
                        adUnitId: "adunit-13934bc1d3a77a93"
                    })).onLoad(function() {}), t.onError(function(t) {}), t.onClose(function() {})), 
                    t && t.show().catch(function(t) {
                        console.error(t);
                    }), this.isEnter = !0, this.setData(), this.getData();
                },
                onShow: function() {
                    var s = this;
                    t.mpvue.setNavigationBarColor({
                        frontColor: "#000000",
                        backgroundColor: "#FFFFFF"
                    }), 5 === this.globalData.scene && (this.globalData.isScene = !0), this.globalData.scene = 1, 
                    t.mpvue.onNetworkStatusChange(function(t) {
                        s.isConnected = t.isConnected;
                    }), this.isFit || t.mpvue.getSystemInfo({
                        success: function(t) {
                            Boolean(t.model.match(/iphone X/gi)) && (s.isFit = !0);
                        }
                    });
                },
                onHide: function() {
                    this.globalData.scene = 5;
                },
                onShareAppMessage: function() {
                    var t = this.globalData.shareArr;
                    return {
                        title: t[Math.floor(Math.random() * t.length)],
                        path: "/pages/main/sort/main"
                    };
                },
                methods: {
                    setData: function() {
                        this.sortNum = this.page = 0, this.cateId = "", this.isMax = !1, this.sortArr = [], 
                        this.subSortArr = [];
                    },
                    handleSort: function(t) {
                        this.sortNum !== t && (this.sortNum = t, this.isMax = !1, this.cateId = this.sortArr[t].id, 
                        this.page = 0, this.subSortArr = [], this.getData());
                    },
                    handleScroll: function() {
                        this.getData();
                    },
                    goMain: function() {
                        t.mpvue.reLaunch({
                            url: "/pages/main/index/main"
                        });
                    },
                    goResult: function(s, a) {
                        t.mpvue.navigateTo({
                            url: "/pages/main/result/main?tag=sort&id=" + s + "&name=" + a
                        });
                    },
                    goSearch: function() {
                        t.mpvue.navigateTo({
                            url: "/pages/main/search/main"
                        });
                    },
                    getData: function() {
                        var s = this;
                        this.page++, this.isMax || t.mpvue.request({
                            url: "https://news.moxiu.com/applets/wallpaper/cate",
                            method: "GET",
                            dataType: "json",
                            data: {
                                page: this.page,
                                cateId: this.cateId
                            },
                            header: {
                                "content-type": "application/json"
                            },
                            success: function(t) {
                                0 === s.sortArr.length && (s.sortArr = t.data.data.cate), s.subSortArr = s.subSortArr.concat(t.data.data.subcate), 
                                s.scrollTop = 0, s.page >= t.data.data.meta.pages && (s.isMax = !0);
                            },
                            fail: function(s) {
                                t.mpvue.showToast({
                                    title: "网络异常，请稍后再试",
                                    icon: "none"
                                });
                            }
                        });
                    }
                }
            };
        }).call(s, a("DuR2"));
    },
    qDs0: function(t, s, a) {
        var i = {
            render: function() {
                var t = this, s = t.$createElement, a = t._self._c || s;
                return a("div", {
                    staticClass: "sort-board-container"
                }, [ a("div", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: t.isConnected,
                        expression: "isConnected"
                    } ],
                    staticClass: "sort-board"
                }, [ a("div", {
                    staticClass: "input-box",
                    attrs: {
                        eventid: "0"
                    },
                    on: {
                        click: t.goSearch
                    }
                }, [ a("img", {
                    staticClass: "search-icon",
                    attrs: {
                        src: "/static/images/search.png"
                    }
                }), t._v(" "), a("p", {
                    staticClass: "main-input"
                }, [ t._v("请输入搜索内容") ]) ], 1), t._v(" "), a("div", {
                    staticClass: "sort-container"
                }, [ a("scroll-view", {
                    staticClass: "sort-box",
                    attrs: {
                        "scroll-y": ""
                    }
                }, [ a("div", {
                    staticClass: "sort-wrapper"
                }, t._l(t.sortArr, function(s, i) {
                    return a("div", [ a("div", {
                        staticClass: "sort",
                        class: {
                            "sort-active": i === t.sortNum,
                            "sort-top-active": i === t.sortNum - 1,
                            "sort-bottom-active": i === t.sortNum + 1
                        },
                        attrs: {
                            eventid: "1_" + i
                        },
                        on: {
                            click: function(s) {
                                t.handleSort(i);
                            }
                        }
                    }, [ t._v(t._s(s.name)) ]) ]);
                })) ]), t._v(" "), a("scroll-view", {
                    staticClass: "subsort-box",
                    attrs: {
                        "scroll-y": "",
                        "scroll-top": t.scrollTop,
                        eventid: "3"
                    },
                    on: {
                        scrolltolower: t.handleScroll
                    }
                }, t._l(t.subSortArr, function(s, i) {
                    return a("div", {
                        staticClass: "subsort",
                        attrs: {
                            eventid: "2_" + i
                        },
                        on: {
                            click: function(a) {
                                t.goResult(s.id, s.name);
                            }
                        }
                    }, [ a("div", {
                        staticClass: "avatar",
                        style: {
                            "background-image": "url(" + s.cover + ")"
                        }
                    }), t._v(" "), a("p", {
                        staticClass: "name"
                    }, [ t._v(t._s(s.name)) ]), t._v(" "), a("img", {
                        staticClass: "arrow",
                        attrs: {
                            src: "/static/images/arrow.png"
                        }
                    }) ], 1);
                })) ], 1), t._v(" "), a("div", {
                    staticClass: "tab-container",
                    class: {
                        "tab-container-active": t.isFit
                    }
                }, [ a("div", {
                    staticClass: "tab-box",
                    attrs: {
                        eventid: "4"
                    },
                    on: {
                        click: t.goMain
                    }
                }, [ a("img", {
                    staticClass: "icon",
                    attrs: {
                        src: "/static/images/main.png"
                    }
                }), t._v(" "), a("p", [ t._v("首页") ]) ], 1), t._v(" "), a("div", {
                    staticClass: "tab-box"
                }, [ a("img", {
                    staticClass: "icon",
                    attrs: {
                        src: "/static/images/sort-on.png"
                    }
                }), t._v(" "), a("p", {
                    staticClass: "word"
                }, [ t._v("分类") ]) ], 1) ]) ]), t._v(" "), !t.isConnected && t.isEnter ? a("div", {
                    staticClass: "network-remind"
                }, [ a("img", {
                    staticClass: "remind-icon",
                    attrs: {
                        src: "/static/images/network-remind.png"
                    }
                }), t._v(" "), a("p", [ t._v("网络开小差了~ ") ]) ], 1) : t._e() ]);
            },
            staticRenderFns: []
        };
        s.a = i;
    },
    qjOI: function(t, s, a) {
        Object.defineProperty(s, "__esModule", {
            value: !0
        });
        var i = a("5nAL"), n = a.n(i), e = a("UAfB");
        new n.a(e.a).$mount();
    }
}, [ "qjOI" ]);